def isPrime(num):
    for k in range(2,int(num**0.5)+1):
        if num%k==0:
            break
        else:
            print("простое")
            break
n=["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
nums=input().split()
if len(nums)!=3:
    print("Wrong input")
else:
    for i in range(3):
        if nums[i] not in n:
            print("Wrong input")
            break
for i in range(10):
    if (nums[0]==n[i]):
        x=i*100
    if (nums[1]==n[i]):
        y=i*10
    if (nums[2]==n[i]):
        z=i        
summ=x+y+z
isPrime(summ)
print(summ)
